home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 1999 August / SGI Freeware 1999 August.iso / dist / fw_emacs.idb / usr / freeware / info / ccmode-2.z / ccmode-2
Encoding:
GNU Info File  |  1998-10-28  |  48.2 KB  |  1,100 lines

  1. This is Info file ../info/ccmode, produced by Makeinfo-1.63 from the
  2. input file cc-mode.texi.
  3.  
  4.    Copyright (C) 1995 Free Software Foundation, Inc.
  5.  
  6. 
  7. File: ccmode,  Node: Custom Indentation Functions,  Next: Custom Brace and Colon Hanging,  Up: Advanced Customizations
  8.  
  9. Custom Indentation Functions
  10. ----------------------------
  11.  
  12.    One of the most common ways to customize `cc-mode' is by writing
  13. "custom indentation functions" and associating them with specific
  14. syntactic symbols (see *Note Syntactic Symbols::).  `cc-mode' itself
  15. uses custom indentation functions to provide more sophisticated
  16. indentation, for example when lining up C++ stream operator blocks:
  17.  
  18.      1: void main(int argc, char**)
  19.      2: {
  20.      3:   cout << "There were "
  21.      4:     << argc
  22.      5:     << "arguments passed to the program"
  23.      6:     << endl;
  24.      7: }
  25.  
  26.    In this example, lines 4 through 6 are assigned the `stream-op'
  27. syntactic symbol.  If `stream-op' had an offset of `+', and
  28. `c-basic-offset' was 2, lines 4 through 6 would simply be indented two
  29. spaces to the right of line 3.  But perhaps we'd like `cc-mode' to be a
  30. little more intelligent so that it offsets the stream operators under
  31. the operator in line 3.  To do this, we have to write a custom
  32. indentation function which finds the column of first stream operator on
  33. the first line of the statement.  Here is the lisp code (from the
  34. `cc-mode.el' source file) that implements this:
  35.  
  36.      (defun c-lineup-streamop (langelem)
  37.        ;; lineup stream operators
  38.        (save-excursion
  39.          (let* ((relpos (cdr langelem))
  40.                 (curcol (progn (goto-char relpos)
  41.                                (current-column))))
  42.            (re-search-forward "<<\\|>>" (c-point 'eol) 'move)
  43.            (goto-char (match-beginning 0))
  44.            (- (current-column) curcol))))
  45.  
  46. Custom indent functions take a single argument, which is a syntactic
  47. component cons cell (see *Note Syntactic Analysis::).  The function
  48. returns an integer offset value that will be added to the running total
  49. indentation for the line.  Note that what actually gets returned is the
  50. difference between the column that the first stream operator is on, and
  51. the column of the buffer relative position passed in the function's
  52. argument.  Remember that `cc-mode' automatically adds in the column of
  53. the component's relative buffer position and we don't want that value
  54. added into the final total twice.
  55.  
  56.    Now, to associate the function `c-lineup-streamop' with the
  57. `stream-op' syntactic symbol, we can add something like the following
  58. to our `c++-mode-hook'(1):
  59.  
  60.      (c-set-offset 'stream-op 'c-lineup-streamop)
  61.  
  62.    Now the function looks like this after re-indenting (using `C-c
  63. C-q'):
  64.  
  65.      1: void main(int argc, char**)
  66.      2: {
  67.      3:   cout << "There were "
  68.      4:        << argc
  69.      5:        << "arguments passed to the program"
  70.      6:        << endl;
  71.      7: }
  72.  
  73.    Custom indentation functions can be as simple or as complex as you
  74. like, and any syntactic symbol that appears in `c-offsets-alist' can
  75. have a custom indentation function associated with it.
  76.  
  77.    ---------- Footnotes ----------
  78.  
  79.    (1)  It probably makes more sense to add this to `c++-mode-hook'
  80. than `c-mode-common-hook' since stream operators are only relevant for
  81. C++.
  82.  
  83. 
  84. File: ccmode,  Node: Custom Brace and Colon Hanging,  Next: Customizing Semi-colons and Commas,  Prev: Custom Indentation Functions,  Up: Advanced Customizations
  85.  
  86. Custom Brace and Colon Hanging
  87. ------------------------------
  88.  
  89.    Syntactic symbols aren't the only place where you can customize
  90. `cc-mode' with the lisp equivalent of callback functions.  Brace
  91. hanginess can also be determined by custom functions associated with
  92. syntactic symbols on the `c-hanging-braces-alist' variable.  Remember
  93. that ACTION's are typically a list containing some combination of the
  94. symbols `before' and `after' (see *Note Hanging Braces::).  However, an
  95. ACTION can also be a function symbol which gets called when a brace
  96. matching that syntactic symbol is typed.
  97.  
  98.    These ACTION functions are called with two arguments: the syntactic
  99. symbol for the brace, and the buffer position at which the brace was
  100. inserted.  The ACTION function is expected to return a list containing
  101. some combination of `before' and `after'.  The function can also return
  102. `nil'.  This return value has the normal brace hanging semantics
  103. described in *Note Hanging Braces::.
  104.  
  105.    As an example, `cc-mode' itself uses this feature to dynamically
  106. determine the hanginess of braces which close `do-while' constructs:
  107.  
  108.      void do_list( int count, char** atleast_one_string )
  109.      {
  110.          int i=0;
  111.          do {
  112.              handle_string( atleast_one_string( i ));
  113.              i++;
  114.          } while( i < count );
  115.      }
  116.  
  117.    `cc-mode' assigns the `block-close' syntactic symbol to the brace
  118. that closes the `do' construct, and normally we'd like the line that
  119. follows a `block-close' brace to begin on a separate line.  However,
  120. with `do-while' constructs, we want the `while' clause to follow the
  121. closing brace.  To do this, we associate the `block-close' symbol with
  122. the ACTION function `c-snug-do-while':
  123.  
  124.      (defun c-snug-do-while (syntax pos)
  125.        "Dynamically calculate brace hanginess for do-while statements.
  126.      Using this function, `while' clauses that end a `do-while' block will
  127.      remain on the same line as the brace that closes that block.
  128.      
  129.      See `c-hanging-braces-alist' for how to utilize this function as an
  130.      ACTION associated with `block-close' syntax."
  131.        (save-excursion
  132.          (let (langelem)
  133.            (if (and (eq syntax 'block-close)
  134.                     (setq langelem (assq 'block-close c-syntactic-context))
  135.                     (progn (goto-char (cdr langelem))
  136.                            (if (= (following-char) ?{)
  137.                                (forward-sexp -1))
  138.                            (looking-at "\\<do\\>[^_]")))
  139.                '(before)
  140.              '(before after)))))
  141.  
  142.    This function simply looks to see if the brace closes a `do-while'
  143. clause and if so, returns the list ``(before)'' indicating that a
  144. newline should be inserted before the brace, but not after it.  In all
  145. other cases, it returns the list ``(before after)'' so that the brace
  146. appears on a line by itself.
  147.  
  148.    During the call to the brace hanging ACTION function, the variable
  149. `c-syntactic-context' is bound to the full syntactic analysis list.
  150.  
  151.    Note that for symmetry, colon hanginess should be customizable by
  152. allowing function symbols as ACTIONs on the `c-hanging-colon-alist'
  153. variable.  Since no use has actually been found for this feature, it
  154. isn't currently implemented.
  155.  
  156. 
  157. File: ccmode,  Node: Customizing Semi-colons and Commas,  Next: Other Special Indentations,  Prev: Custom Brace and Colon Hanging,  Up: Advanced Customizations
  158.  
  159. Customizing Semi-colons and Commas
  160. ----------------------------------
  161.  
  162.    You can also customize the insertion of newlines after semi-colons
  163. and commas, when the auto-newline minor mode is enabled (see *Note
  164. Minor Modes::).  This is controlled by the variable
  165. `c-hanging-semi&comma-criteria', which contains a list of functions
  166. that are called in the order they appear.  Each function is called with
  167. zero arguments, and is expected to return one of the following values:
  168.  
  169.    * non-`nil' - A newline is inserted, and no more functions from the
  170.      list are called.
  171.  
  172.    * `stop' - No more functions from the list are called, but no
  173.      newline is inserted.
  174.  
  175.    * `nil' - No determination is made, and the next function in the
  176.      list is called.
  177.  
  178.    If every function in the list is called without a determination being
  179. made, then no newline is added. The default value for this variable is a
  180. list containing a single function which inserts newlines only after
  181. semi-colons which do not appear inside parenthesis lists (i.e. those
  182. that separate `for'-clause statements).
  183.  
  184. 
  185. File: ccmode,  Node: Other Special Indentations,  Prev: Customizing Semi-colons and Commas,  Up: Advanced Customizations
  186.  
  187. Other Special Indentations
  188. --------------------------
  189.  
  190.    One other customization variable is available in `cc-mode':
  191. `c-special-indent-hook'.  This is a standard hook variable that is
  192. called after every line is indented by `cc-mode'.  You can use it to do
  193. any special indentation or line adjustments your style dictates, such
  194. as adding extra indentation to constructors or destructor declarations
  195. in a class definition, etc.  Note however, that you should not change
  196. point or mark inside your `c-special-indent-hook' functions (i.e.
  197. you'll probably want to wrap your function in a `save-excursion').
  198.  
  199. 
  200. File: ccmode,  Node: Syntactic Symbols,  Next: Performance Issues,  Prev: Customizing Indentation,  Up: Top
  201.  
  202. Syntactic Symbols
  203. *****************
  204.  
  205.    The complete list of recognized syntactic symbols is described in the
  206. `c-offsets-alist' variable.  This chapter will provide some examples to
  207. help clarify these symbols.
  208.  
  209.    Most syntactic symbol names follow a general naming convention.
  210. When a line begins with an open or close brace, the syntactic symbol
  211. will contain the suffix `-open' or `-close' respectively.
  212.  
  213.    Usually, a distinction is made between the first line that
  214. introduces a construct and lines that continue a construct, and the
  215. syntactic symbols that represent these lines will contain the suffix
  216. `-intro' or `-cont' respectively.  As a sub-classification of this
  217. scheme, a line which is the first of a particular brace block construct
  218. will contain the suffix `-block-intro'.
  219.  
  220.    Let's look at some examples to understand how this works.  Remember
  221. that you can check the syntax of any line by using `C-c C-s'.
  222.  
  223.        1: void
  224.        2: swap( int& a, int& b )
  225.        3: {
  226.        4:     int tmp = a;
  227.        5:     a = b;
  228.        6:     b = tmp;
  229.        7:     int ignored =
  230.        8:         a + b;
  231.        9: }
  232.  
  233.    Line 1 shows a `topmost-intro' since it is the first line that
  234. introduces a top-level construct.  Line 2 is a continuation of the
  235. top-level construct introduction so it has the syntax
  236. `topmost-intro-cont'.  Line 3 shows a `defun-open' since it is the
  237. brace that opens a top-level function definition.  Line 9 is a
  238. `defun-close' since it contains the brace that closes the top-level
  239. function definition.  Line 4 is a `defun-block-intro', i.e. it is the
  240. first line of a brace-block, which happens to be enclosed in a
  241. top-level function definition.
  242.  
  243.    Lines 5, 6, and 7 are all given `statement' syntax since there isn't
  244. much special about them.  Note however that line 8 is given
  245. `statement-cont' syntax since it continues the statement begun on the
  246. previous line.
  247.  
  248.    Here's another example, which illustrates some C++ class syntactic
  249. symbols:
  250.  
  251.         1: class Bass
  252.         2:     : public Guitar,
  253.         3:       public Amplifiable
  254.         4: {
  255.         5: public:
  256.         6:     Bass()
  257.         7:         : eString( new BassString( 0.105 )),
  258.         8:           aString( new BassString( 0.085 )),
  259.         9:           dString( new BassString( 0.065 )),
  260.        10:           gString( new BassString( 0.045 ))
  261.        11:     {
  262.        12:         eString.tune( 'E' );
  263.        13:         aString.tune( 'A' );
  264.        14:         dString.tune( 'D' );
  265.        15:         gString.tune( 'G' );
  266.        16:     }
  267.        17: }
  268.  
  269.    As in the previous example, line 1 has the `topmost-intro' syntax.
  270. Here however, the brace that opens a C++ class definition on line 4 is
  271. assigned the `class-open' syntax.  Note that in C++, structs and unions
  272. are essentially equivalent syntactically (and are very similar
  273. semantically), so replacing the `class' keyword in the example above
  274. with `struct' or `union' would still result in a syntax of `class-open'
  275. for line 4 (1).  Similarly, line 17 is assigned `class-close' syntax.
  276.  
  277.    Line 2 introduces the inheritance list for the class so it is
  278. assigned the `inher-intro' syntax, and line 3, which continues the
  279. inheritance list is given `inher-cont' syntax.
  280.  
  281.    Things get interesting at line 5.  The primary syntactic symbol for
  282. this line is `access-label' since this a label keyword that specifies
  283. access protection in C++.  However, this line actually shows two
  284. syntactic symbols when you hit `C-c C-s'.  This is because it is also a
  285. top-level construct inside a class definition.  Thus the other
  286. syntactic symbol assigned to this line is `inclass'.  Similarly, line 6
  287. is given both `inclass' and `topmost-intro' syntax.
  288.  
  289.    Line 7 introduces a C++ member initialization list and as such is
  290. given `member-init-intro' syntax.  Note that in this case it is *not*
  291. assigned `inclass' since this is not considered a top-level construct.
  292. Lines 8 through 10 are all assigned `member-init-cont' since they
  293. continue the member initialization list started on line 7.
  294.  
  295.    Line 11 is assigned `inline-open' because it opens an "in-class" C++
  296. inline method definition.  This is distinct from, but related to, the
  297. C++ notion of an inline function in that its definition occurs inside
  298. an enclosing class definition, which in C++ implies that the function
  299. should be inlined.  For example, if the definition of the `Bass'
  300. constructor appeared outside the class definition, line 11 would be
  301. given the `defun-open' syntax, even if the keyword `inline' appeared
  302. before the method name, as in:
  303.  
  304.      class Bass
  305.          : public Guitar,
  306.            public Amplifiable
  307.      {
  308.      public:
  309.          Bass();
  310.      }
  311.      
  312.      inline
  313.      Bass::Bass()
  314.          : eString( new BassString( 0.105 )),
  315.            aString( new BassString( 0.085 )),
  316.            dString( new BassString( 0.065 )),
  317.            gString( new BassString( 0.045 ))
  318.      {
  319.          eString.tune( 'E' );
  320.          aString.tune( 'A' );
  321.          dString.tune( 'D' );
  322.          gString.tune( 'G' );
  323.      }
  324.  
  325. Similarly, line 16 is given `inline-close' syntax.
  326.  
  327.    As in the first example above, line 12 is given `defun-block-open'
  328. syntax and lines 13 through 15 are all given `statement' syntax.
  329.  
  330.    Here is another (totally contrived) example which illustrates how
  331. syntax is assigned to various conditional constructs:
  332.  
  333.         1: void spam( int index )
  334.         2: {
  335.         3:     for( int i=0; i<index; i++ )
  336.         4:     {
  337.         5:         if( i == 10 )
  338.         6:         {
  339.         7:             do_something_special();
  340.         8:         }
  341.         9:         else
  342.        10:             do_something( i );
  343.        11:     }
  344.        12:     do {
  345.        13:         another_thing( i-- );
  346.        14:     }
  347.        15:     while( i > 0 );
  348.        16: }
  349.  
  350. Only the lines that illustrate new syntactic symbols will be discussed.
  351.  
  352.    Line 4 has a brace which opens a conditional's substatement block.
  353. It is thus assigned `substatement-open' syntax, and since line 5 is the
  354. first line in the substatement block, it is assigned
  355. `substatement-block-intro' syntax.  Lines 6 and 7 are assigned similar
  356. syntax.  Line 8 contains the brace that closes the inner substatement
  357. block.  It is given the generic syntax `block-close', as are lines 11
  358. and 14.
  359.  
  360.    Line 9 is a little different - since it contains the keyword `else'
  361. matching the `if' statement introduced on line 5; it is given the
  362. `else-clause' syntax.  Note also that line 10 is slightly different
  363. too.  Because `else' is considered a conditional introducing keyword
  364. (2), and because the following substatement is not a brace block, line
  365. 10 is assigned the `substatement' syntax.
  366.  
  367.    One other difference is seen on line 15.  The `while' construct that
  368. closes a `do' conditional is given the special syntax
  369. `do-while-closure' if it appears on a line by itself.  Note that if the
  370. `while' appeared on the same line as the preceding close brace, that
  371. line would have been assigned `block-close' syntax instead.
  372.  
  373.    Switch statements have their own set of syntactic symbols.  Here's an
  374. example:
  375.  
  376.         1: void spam( enum Ingredient i )
  377.         2: {
  378.         3:     switch( i ) {
  379.         4:     case Ham:
  380.         5:         be_a_pig();
  381.         6:         break;
  382.         7:     case Salt:
  383.         8:         drink_some_water();
  384.         9:         break;
  385.        10:     default:
  386.        11:         {
  387.        12:             what_is_it();
  388.        13:             break;
  389.        14:         }
  390.        15:     }
  391.        14: }
  392.  
  393.    Here, lines 4, 7, and 10 are all assigned `case-label' syntax, while
  394. lines 5 and 8 are assigned `statement-case-intro'.  Line 11 is treated
  395. slightly differently since it contains a brace that opens a block - it
  396. is given `statement-case-open' syntax.
  397.  
  398.    There are a set of syntactic symbols that are used to recognize
  399. constructs inside of brace lists.  A brace list is defined as an `enum'
  400. or aggregate initializer list, such as might statically initialize an
  401. array of structs.  For example:
  402.  
  403.        1: static char* ingredients[] =
  404.        2: {
  405.        3:     "Ham",
  406.        4:     "Salt",
  407.        5:     NULL
  408.        6: }
  409.  
  410.    Following convention, line 2 in this example is assigned
  411. `brace-list-open' syntax, and line 3 is assigned `brace-list-intro'
  412. syntax.  Likewise, line 6 is assigned `brace-list-close' syntax.  Lines
  413. 4 and 5 however, are assigned `brace-list-entry' syntax, as would all
  414. subsequent lines in this initializer list.
  415.  
  416.    A number of syntactic symbols are associated with parenthesis lists,
  417. a.k.a argument lists, as found in function declarations and function
  418. calls.  This example illustrates these:
  419.  
  420.         1: void a_function( int line1,
  421.         2:                  int line2 );
  422.         3:
  423.         4: void a_longer_function(
  424.         5:     int line1,
  425.         6:     int line2
  426.         7:     );
  427.         8:
  428.         9: void call_them( int line1, int line2 )
  429.        10: {
  430.        11:     a_function(
  431.        12:         line1,
  432.        13:         line2
  433.        14:         );
  434.        15:
  435.        16:     a_longer_function( line1,
  436.        17:                        line2 );
  437.        18: }
  438.  
  439.    Lines 5 and 12 are assigned `arglist-intro' syntax since they are
  440. the first line following the open parenthesis, and lines 7 and 14 are
  441. assigned `arglist-close' syntax since they contain the parenthesis that
  442. closes the argument list.
  443.  
  444.    The other lines with relevant syntactic symbols include lines 2 and
  445. 17 which are assigned `arglist-cont-nonempty' syntax.  What this means
  446. is that they continue an argument list, but that the line containing the
  447. parenthesis that opens the list is *non-empty* following the open
  448. parenthesis.  Contrast this against lines 6 and 13 which are assigned
  449. `arglist-cont' syntax.  This is because the parenthesis that opens
  450. their argument lists is the last character on that line (3).
  451.  
  452.    Note that there is no `arglist-open' syntax.  This is because any
  453. parenthesis that opens an argument list, appearing on a separate line,
  454. is assigned the `statement-cont' syntax instead.
  455.  
  456.    A few miscellaneous syntactic symbols that haven't been previously
  457. covered are illustrated by this example:
  458.  
  459.         1: void Bass::play( int volume )
  460.         2: const
  461.         3: {
  462.         4:     /* this line starts a multi-line
  463.         5:      * comment.  This line should get `c' syntax */
  464.         6:
  465.         7:     char* a_long_multiline_string = "This line starts a multi-line \
  466.         8: string.  This line should get `string' syntax.";
  467.         9:
  468.        10:   note:
  469.        11:     {
  470.        12: #ifdef LOCK
  471.        13:         Lock acquire();
  472.        14: #endif // LOCK
  473.        15:         slap_pop();
  474.        16:         cout << "I played "
  475.        17:              << "a note\n";
  476.        18:     }
  477.        19: }
  478.  
  479.    The lines to note in this example include:
  480.  
  481.    * line 2 which is assigned the `ansi-funcdecl-cont' syntax;
  482.  
  483.    * line 4 which is assigned both `defun-block-intro' *and*
  484.      `comment-intro' syntax (4);
  485.  
  486.    * line 5 which is assigned `c' syntax;
  487.  
  488.    * line 6 which, even though it contains nothing but whitespace, is
  489.      assigned `defun-block-intro'.  Note that the appearance of the
  490.      comment on lines 4 and 5 do not cause line 6 to be assigned
  491.      `statement' syntax because comments are considered to be
  492.      "syntactic whitespace", which are essentially ignored when
  493.      analyzing code;
  494.  
  495.    * line 8 which is assigned `string' syntax;
  496.  
  497.    * line 10 which is assigned `label' syntax;
  498.  
  499.    * line 11 which is assigned `block-open' syntax;
  500.  
  501.    * lines 12 and 14 which are assigned `cpp-macro' syntax;
  502.  
  503.    * line 17 which is assigned `stream-op' syntax (5).
  504.  
  505.    In Objective-C buffers, there are three additional syntactic symbols
  506. assigned to various message calling constructs.  Here's an example
  507. illustrating these:
  508.  
  509.        1: - (void)setDelegate:anObject
  510.        2:           withStuff:stuff
  511.        3: {
  512.        4:     [delegate masterWillRebind:self
  513.        5:               toDelegate:anObject
  514.        6:               withExtraStuff:stuff];
  515.        7: }
  516.  
  517.    Here, line 1 is assigned `objc-method-intro' syntax, and line 2 is
  518. assigned `objc-method-args-cont' syntax.  Lines 5 and 6 are both
  519. assigned `objc-method-call-cont' syntax.
  520.  
  521.    Other syntactic symbols may be recognized by `cc-mode', but these
  522. are more obscure and so I haven't included examples of them.  These
  523. include: `knr-argdecl-intro', `knr-argdecl', and the `friend' modifier.
  524.  
  525.    ---------- Footnotes ----------
  526.  
  527.    (1)  This is the case even for C and Objective-C.  For consistency,
  528. structs in all three languages are syntactically equivalent to classes.
  529. Note however that the keyword `class' is meaningless in C and
  530. Objective-C.
  531.  
  532.    (2)  The list of conditional keywords are (in C, Objective-C and
  533. C++): `for', `if', `do', `else', `while', and `switch'.  C++ has two
  534. additional conditional keywords: `try' and `catch'.
  535.  
  536.    (3)  The need for this somewhat confusing arrangement is that the
  537. typical indentation desired for these lines is calculated very
  538. differently.  This should be simplified in version 5 of `cc-mode',
  539. along with the added distinction between argument lists in function
  540. declarations, and argument lists in function calls.
  541.  
  542.    (4)  The `comment-intro' syntactic symbol is known generically as a
  543. "modifier" since it always appears on a syntactic analysis list with
  544. other symbols, and never has a relative buffer position.
  545.  
  546.    (5)  In C++ only.
  547.  
  548. 
  549. File: ccmode,  Node: Performance Issues,  Next: Frequently Asked Questions,  Prev: Syntactic Symbols,  Up: Top
  550.  
  551. Performance Issues
  552. ******************
  553.  
  554.    C and its derivative languages are highly complex creatures.  Often,
  555. ambiguous code situations arise that require `cc-mode' to scan large
  556. portions of the buffer to determine syntactic context.  Some
  557. pathological code can cause `cc-mode' to slow down considerably.  This
  558. section identifies some of the coding styles to watch out for, and
  559. suggests some workarounds that you can use to improve performance.
  560.  
  561.    Note that this is an area that will get a lot of attention in
  562. `cc-mode' version 5.  The mode should end up being much faster, at the
  563. expense of dropping Emacs 18 support, owing to the implementation of
  564. syntactic analysis caching.  This is the last release of `cc-mode' that
  565. will be compatible with Emacs 18.
  566.  
  567.    Because `cc-mode' has to scan the buffer backwards from the current
  568. insertion point, and because C's syntax is fairly difficult to parse in
  569. the backwards direction, `cc-mode' often tries to find the nearest
  570. position higher up in the buffer from which to begin a forward scan.
  571. The farther this position is from the current insertion point, the
  572. slower the mode gets.  Some coding styles can even force `cc-mode' to
  573. scan from the beginning of the buffer!
  574.  
  575.    One of the simplest things you can do to reduce scan time, is make
  576. sure any brace that opens a top-level block construct always appears in
  577. the leftmost column.  This is actually an Emacs constraint, as embodied
  578. in the `beginning-of-defun' function which `cc-mode' uses heavily.  If
  579. you insist on hanging top-level open braces on the right side of the
  580. line, then you should set the variable `defun-prompt-regexp' to
  581. something reasonable (1), however that "something reasonable" is
  582. difficult to define, so `cc-mode' doesn't do it for you.
  583.  
  584.    You will probably notice pathological behavior from `cc-mode' when
  585. working in files containing large amounts of cpp macros.  This is
  586. because `cc-mode' cannot quickly skip backwards over these lines, which
  587. do not contribute to the syntactic calculations.  You'll probably also
  588. have problems if you are editing "K&R" C code, i.e. C code that does
  589. not use function prototypes.  This is because there are ambiguities in
  590. the C syntax when K&R style argument lists are used, and `cc-mode' has
  591. to use a slower scan to determine what it's looking at.
  592.  
  593.    For the latter problem, I would suggest converting to ANSI style
  594. protocols, and turning the variable `c-recognize-knr-p' to `nil' (this
  595. is its default value for all modes).
  596.  
  597.    For the former problem, you might want to investigate some of the
  598. speed-ups provided for you in the file `cc-lobotomy.el', which is part
  599. of the canonical `cc-mode' distribution.  As mentioned previously,
  600. `cc-mode' always trades accuracy for speed; however it is recognized
  601. that sometimes you need speed and can sacrifice some accuracy in
  602. indentation.  The file `cc-lobotomy.el' contains hacks that will "dumb
  603. down" `cc-mode' in some specific ways, making that trade-off of speed
  604. for accuracy.  I won't go into details of its use here; you should read
  605. the comments at the top of the file, and look at the variable
  606. `cc-lobotomy-pith-list' for details.
  607.  
  608.    ---------- Footnotes ----------
  609.  
  610.    (1)  Note that this variable is only defined in Emacs 19.
  611.  
  612. 
  613. File: ccmode,  Node: Frequently Asked Questions,  Next: Getting the latest cc-mode release,  Prev: Performance Issues,  Up: Top
  614.  
  615. Frequently Asked Questions
  616. **************************
  617.  
  618.      *Q.* *How do I re-indent the whole file?*
  619.  
  620.      *A.* Visit the file and hit `C-x h' to mark the whole buffer. Then
  621.      hit `ESC C-\'.
  622.  
  623.      *Q.* *How do I re-indent the entire function?  `ESC C-x' doesn't
  624.      work.*
  625.  
  626.      *A.* `ESC C-x' is reserved for future Emacs use.  To re-indent the
  627.      entire function hit `C-c C-q'.
  628.  
  629.      *Q.* *How do I re-indent the current block?*
  630.  
  631.      *A.* First move to the brace which opens the block with `ESC C-u',
  632.      then re-indent that expression with `ESC C-q'.
  633.  
  634.      *Q.* *Why doesn't the RET key indent the line to where the new
  635.      text should go after inserting the newline?*
  636.  
  637.      *A.* Emacs' convention is that RET just adds a newline, and that
  638.      LFD adds a newline and indents it.  You can make RET do this too
  639.      by adding this to your `c-mode-common-hook' (see the sample
  640.      `.emacs' file *Note Sample .emacs File::):
  641.  
  642.           (define-key c-mode-map "\C-m" 'newline-and-indent)
  643.  
  644.      This is a very common question. `:-)' If you want this to be the
  645.      default behavior, don't lobby me, lobby RMS!
  646.  
  647.      *Q.* *I put `(c-set-offset 'substatement-open 0)' in my `.emacs'
  648.      file but I get an error saying that `c-set-offset''s function
  649.      definition is void.*
  650.  
  651.      *A.* This means that `cc-mode' wasn't loaded into your Emacs
  652.      session by the time the `c-set-offset' call was reached, mostly
  653.      likely because `cc-mode' is being autoloaded.  Instead of putting
  654.      the `c-set-offset' line in your top-level `.emacs' file, put it in
  655.      your `c-mode-common-hook', or simply add the following to the top
  656.      of your `.emacs' file:
  657.  
  658.           (require 'cc-mode)
  659.  
  660.      See the sample `.emacs' file *Note Sample .emacs File:: for
  661.      details.
  662.  
  663.      *Q.* *How do I make strings, comments, keywords, and other
  664.      constructs appear in different colors, or in bold face, etc.?*
  665.  
  666.      *A.* "Syntax Colorization" is an Emacs 19 feature, controlled by
  667.      `font-lock-mode'.  It is not part of `cc-mode'.
  668.  
  669.  
  670. 
  671. File: ccmode,  Node: Getting the latest cc-mode release,  Next: Sample .emacs File,  Prev: Frequently Asked Questions,  Up: Top
  672.  
  673. Getting the latest `cc-mode' release
  674. ************************************
  675.  
  676.    `cc-mode' is now distributed with both Emacs 19 and XEmacs 19, so
  677. you would typically just use the version that comes with your Emacs.
  678. Users of older versions of Emacs can get the latest release from this
  679. URL:
  680.  
  681.  
  682.          `ftp://ftp.python.org/pub/emacs/cc-mode.tar.gz'
  683.  
  684.    Note that this is a "gzipped" tar file.
  685.  
  686.    If you do not have anonymous ftp access, you can get the distribution
  687. through an anonymous ftp-to-mail gateway, such as the one run by DEC at
  688. `ftpmail@decwrl.dec.com'.  To get `cc-mode' via email, send the
  689. following message in the body of your mail to that address:
  690.  
  691.      reply <a valid net address back to you>
  692.      connect ftp.python.org
  693.      binary
  694.      uuencode
  695.      chdir pub/emacs
  696.      get cc-mode.tar.gz
  697.  
  698. or just send the message "help" for more information on ftpmail.
  699. Response times will vary with the number of requests in the queue.
  700.  
  701. 
  702. File: ccmode,  Node: Sample .emacs File,  Next: Requirements,  Prev: Getting the latest cc-mode release,  Up: Top
  703.  
  704. Sample `.emacs' file
  705. ********************
  706.  
  707.      ;; Here's a sample .emacs file that might help you along the way.  Just
  708.      ;; copy this region and paste it into your .emacs file.  You may want to
  709.      ;; change some of the actual values.
  710.      
  711.      (defconst my-c-style
  712.        '((c-tab-always-indent           . t)
  713.          (c-comment-only-line-offset    . 4)
  714.          (c-hanging-braces-alist        . ((substatement-open after)
  715.                                            (brace-list-open)))
  716.          (c-hanging-colons-alist        . ((member-init-intro before)
  717.                                            (inher-intro)
  718.                                            (case-label after)
  719.                                            (label after)
  720.                                            (access-label after)))
  721.          (c-cleanup-list                . (scope-operator
  722.                                            empty-defun-braces
  723.                                            defun-close-semi))
  724.          (c-offsets-alist               . ((arglist-close     . c-lineup-arglist)
  725.                                            (substatement-open . 0)
  726.                                            (case-label        . 4)
  727.                                            (block-open        . 0)
  728.                                            (knr-argdecl-intro . -)))
  729.          (c-echo-syntactic-information-p . t)
  730.          )
  731.        "My C Programming Style")
  732.      
  733.      ;; Customizations for all of c-mode, c++-mode, and objc-mode
  734.      (defun my-c-mode-common-hook ()
  735.        ;; add my personal style and set it for the current buffer
  736.        (c-add-style "PERSONAL" my-c-style t)
  737.        ;; offset customizations not in my-c-style
  738.        (c-set-offset 'member-init-intro '++)
  739.        ;; other customizations
  740.        (setq tab-width 8
  741.              ;; this will make sure spaces are used instead of tabs
  742.              indent-tabs-mode nil)
  743.        ;; we like auto-newline and hungry-delete
  744.        (c-toggle-auto-hungry-state 1)
  745.        ;; keybindings for C, C++, and Objective-C.  We can put these in
  746.        ;; c-mode-map because c++-mode-map and objc-mode-map inherit it
  747.        (define-key c-mode-map "\C-m" 'newline-and-indent)
  748.        )
  749.      
  750.      ;; the following only works in Emacs 19
  751.      ;; Emacs 18ers can use (setq c-mode-common-hook 'my-c-mode-common-hook)
  752.      (add-hook 'c-mode-common-hook 'my-c-mode-common-hook)
  753.  
  754. 
  755. File: ccmode,  Node: Requirements,  Next: Limitations and Known Bugs,  Prev: Sample .emacs File,  Up: Top
  756.  
  757. Requirements
  758. ************
  759.  
  760.    `cc-mode.el' requires `reporter.el' for submission of bug reports.
  761. `reporter.el' is distributed with the latest Emacs 19s.  Here is the
  762. Emacs Lisp Archive anonymous ftp'ing record for those of you who are
  763. using older Emacsen.
  764.  
  765.  
  766.               GNU Emacs Lisp Code Directory Apropos -- "reporter"
  767.      "~/" refers to archive.cis.ohio-state.edu:/pub/gnu/emacs/elisp-archive/
  768.      
  769.      reporter (2.12)       06-Jul-1994
  770.           Barry A. Warsaw, <bwarsaw@cnri.reston.va.us>
  771.           ~/misc/reporter.el.Z
  772.           Customizable bug reporting of lisp programs.
  773.  
  774. 
  775. File: ccmode,  Node: Limitations and Known Bugs,  Next: Mailing Lists and Submitting Bug Reports,  Prev: Requirements,  Up: Top
  776.  
  777. Limitations and Known Bugs
  778. **************************
  779.  
  780.    * Multi-line macros are not handled properly.
  781.  
  782.    * Re-indenting large regions or expressions can be slow.
  783.  
  784.    * Use with Emacs 18 can be slow and annoying. You should seriously
  785.      consider upgrading to Emacs 19.
  786.  
  787.    * There is still some weird behavior when filling C block comments.
  788.      My suggestion is to check out add-on fill packages such as
  789.      `filladapt', available at the elisp archive.
  790.  
  791.    * Lines following `inline-close' braces which hang "after" do not
  792.      line up correctly.  Hit `TAB' to reindent the line.
  793.  
  794. 
  795. File: ccmode,  Node: Mailing Lists and Submitting Bug Reports,  Next: Concept Index,  Prev: Limitations and Known Bugs,  Up: Top
  796.  
  797. Mailing Lists and Submitting Bug Reports
  798. ****************************************
  799.  
  800.    To report bugs, use the `C-c C-b' (`c-submit-bug-report') command.
  801. This provides vital information I need to reproduce your problem.  Make
  802. sure you include a concise, but complete code example.  Please try to
  803. boil your example down to just the essential code needed to reproduce
  804. the problem, and include an exact recipe of steps needed to expose the
  805. bug.  Be especially sure to include any code that appears *before* your
  806. bug example.
  807.  
  808.    Bug reports are now to be sent to `bug-gnu-emacs@prep.ai.mit.edu'
  809. which is mirrored on the Usenet newsgroup `gnu.emacs.bug'.  Other
  810. questions and suggestions should be mailed to
  811. `help-gnu-emacs@prep.ai.mit.edu' which is mirrored on `gnu.emacs.help'.
  812.  
  813.    Note that the `cc-mode' Majordomo mailing lists have been disbanded!
  814. With the inclusion of `cc-mode' in both of the latest flavors of Emacs
  815. 19, the need for them has ended.
  816.  
  817. 
  818. File: ccmode,  Node: Concept Index,  Next: Command Index,  Prev: Mailing Lists and Submitting Bug Reports,  Up: Top
  819.  
  820. Concept Index
  821. *************
  822.  
  823. * Menu:
  824.  
  825. * -block-intro syntactic symbols:       Syntactic Symbols.
  826. * -close syntactic symbols:             Syntactic Symbols.
  827. * -cont syntactic symbols:              Syntactic Symbols.
  828. * -intro syntactic symbols:             Syntactic Symbols.
  829. * -open syntactic symbols:              Syntactic Symbols.
  830. * .emacs file:                          Getting Connected.
  831. * cc-compat.el file:                    Introduction.
  832. * cc-lobotomy.el file:                  Performance Issues.
  833. * cc-mode-18.el file:                   Getting Connected.
  834. * Adding Styles:                        Adding Styles.
  835. * Advanced Customizations:              Advanced Customizations.
  836. * announcement mailing list:            Mailing Lists and Submitting Bug Reports.
  837. * Auto-newline insertion:               Auto-newline insertion.
  838. * basic-offset (c-):                    Customizing Indentation.
  839. * beta testers mailing list:            Mailing Lists and Submitting Bug Reports.
  840. * block-close syntactic symbol:         Hanging Braces.
  841. * block-open syntactic symbol:          Hanging Braces.
  842. * BOCM:                                 Introduction.
  843. * brace lists:                          Syntactic Symbols.
  844. * brace-list-close syntactic symbol:    Hanging Braces.
  845. * brace-list-entry syntactic symbol:    Hanging Braces.
  846. * brace-list-intro syntactic symbol:    Hanging Braces.
  847. * brace-list-open syntactic symbol:     Hanging Braces.
  848. * BSD style:                            Built-in Styles.
  849. * Built-in Styles:                      Built-in Styles.
  850. * byte compile:                         Getting Connected.
  851. * c-basic-offset:                       Customizing Indentation.
  852. * c-hanging- functions:                 Indentation Commands.
  853. * c-set-offset:                         Customizing Indentation.
  854. * CC-MODE style:                        Built-in Styles.
  855. * class-close syntactic symbol:         Hanging Braces.
  856. * class-open syntactic symbol:          Hanging Braces.
  857. * Clean-ups:                            Clean-ups.
  858. * clean-ups:                            Hanging Colons.
  859. * comment only line:                    Syntactic Analysis.
  860. * comment-only line:                    Other electric commands.
  861. * Custom Brace and Colon Hanging:       Custom Brace and Colon Hanging.
  862. * custom indentation function:          Hanging Braces.
  863. * Custom Indentation Functions:         Custom Indentation Functions.
  864. * customizing brace hanging:            Custom Brace and Colon Hanging.
  865. * customizing colon hanging:            Custom Brace and Colon Hanging.
  866. * Customizing Indentation:              Customizing Indentation.
  867. * Customizing Semi-colons and Commas <1>: Other Special Indentations.
  868. * Customizing Semi-colons and Commas:   Customizing Semi-colons and Commas.
  869. * defun-close syntactic symbol:         Hanging Braces.
  870. * defun-open syntactic symbol:          Hanging Braces.
  871. * electric characters:                  Minor Modes.
  872. * electric commands:                    Auto-newline insertion.
  873. * Ellemtel style:                       Built-in Styles.
  874. * File Styles:                          File Styles.
  875. * Frequently Asked Questions:           Frequently Asked Questions.
  876. * Getting Connected:                    Getting Connected.
  877. * Getting the latest cc-mode release:   Getting the latest cc-mode release.
  878. * GNU style:                            Built-in Styles.
  879. * Hanging Braces:                       Hanging Braces.
  880. * Hanging Colons:                       Hanging Colons.
  881. * Hanging Semi-colons and commas:       Hanging Semi-colons and commas.
  882. * hooks:                                Permanent Customization.
  883. * Hungry-deletion of whitespace:        Hungry-deletion of whitespace.
  884. * in-class inline methods:              Syntactic Symbols.
  885. * Indentation Calculation:              Indentation Calculation.
  886. * Indentation Commands:                 Indentation Commands.
  887. * inline-close:                         Limitations and Known Bugs.
  888. * inline-close syntactic symbol:        Hanging Braces.
  889. * inline-open syntactic symbol:         Hanging Braces.
  890. * Interactive Customization:            Interactive Customization.
  891. * Introduction:                         Introduction.
  892. * Java style:                           Built-in Styles.
  893. * java-mode:                            Built-in Styles.
  894. * K&R style:                            Built-in Styles.
  895. * Limitations and Known Bugs:           Limitations and Known Bugs.
  896. * literal <1>:                          Indentation Commands.
  897. * literal <1>:                          Hungry-deletion of whitespace.
  898. * literal <1>:                          Clean-ups.
  899. * literal:                              Auto-newline insertion.
  900. * local variables:                      File Styles.
  901. * Mailing Lists and Submitting Bug Reports: Mailing Lists and Submitting Bug Reports.
  902. * Minor Modes:                          Minor Modes.
  903. * modifier syntactic symbol:            Syntactic Symbols.
  904. * New Indentation Engine:               New Indentation Engine.
  905. * Other electric commands:              Other electric commands.
  906. * Performance Issues:                   Performance Issues.
  907. * Permanent Indentation:                Permanent Customization.
  908. * relative buffer position:             Syntactic Analysis.
  909. * reporter.el:                          Requirements.
  910. * Requirements:                         Requirements.
  911. * Sample .emacs file:                   Sample .emacs File.
  912. * set-offset (c-):                      Customizing Indentation.
  913. * statement-case-open syntactic symbol: Hanging Braces.
  914. * stream-op syntactic symbol:           Custom Indentation Functions.
  915. * Stroustrup style:                     Built-in Styles.
  916. * Styles:                               Styles.
  917. * substatement:                         Syntactic Analysis.
  918. * substatement block:                   Syntactic Analysis.
  919. * substatement-open syntactic symbol:   Hanging Braces.
  920. * Syntactic Analysis:                   Syntactic Analysis.
  921. * syntactic component:                  Syntactic Analysis.
  922. * syntactic component list:             Syntactic Analysis.
  923. * syntactic symbol:                     Syntactic Analysis.
  924. * Syntactic Symbols:                    Syntactic Symbols.
  925. * syntactic whitespace <1>:             Syntactic Symbols.
  926. * syntactic whitespace:                 Auto-newline insertion.
  927. * TAB:                                  Indentation Calculation.
  928. * Whitesmith style:                     Built-in Styles.
  929.  
  930. 
  931. File: ccmode,  Node: Command Index,  Next: Key Index,  Prev: Concept Index,  Up: Top
  932.  
  933. Command Index
  934. *************
  935.  
  936.    Since all `cc-mode' commands are prepended with the string `c-',
  937. each appears under its `c-<thing>' name and its `<thing> (c-)' name.
  938.  
  939. * Menu:
  940.  
  941. * add-style (c-):                       Adding Styles.
  942. * beginning-of-defun:                   Performance Issues.
  943. * c-add-style:                          Adding Styles.
  944. * c-electric-brace:                     Hanging Braces.
  945. * c-electric-delete:                    Hungry-deletion of whitespace.
  946. * c-electric-pound:                     Other electric commands.
  947. * c-electric-slash:                     Other electric commands.
  948. * c-electric-star:                      Other electric commands.
  949. * c-hanging-braces-alist:               Indentation Commands.
  950. * c-indent-command:                     Indentation Commands.
  951. * c-indent-defun <1>:                   Interactive Customization.
  952. * c-indent-defun:                       Indentation Commands.
  953. * c-indent-exp:                         Indentation Commands.
  954. * c-lineup-streamop:                    Custom Indentation Functions.
  955. * c-mark-function:                      Indentation Commands.
  956. * c-set-offset <1>:                     File Styles.
  957. * c-set-offset:                         Interactive Customization.
  958. * c-set-style <1>:                      Built-in Styles.
  959. * c-set-style:                          Indentation Commands.
  960. * c-show-syntactic-information:         Syntactic Analysis.
  961. * c-snug-do-while:                      Custom Brace and Colon Hanging.
  962. * c-submit-bug-report:                  Mailing Lists and Submitting Bug Reports.
  963. * c-toggle-auto-hungry-state:           Minor Modes.
  964. * c-toggle-auto-state:                  Minor Modes.
  965. * c-toggle-hungry-state:                Minor Modes.
  966. * c-version:                            Introduction.
  967. * defun-prompt-regexp:                  Performance Issues.
  968. * electric-brace (c-):                  Hanging Braces.
  969. * electric-delete (c-):                 Hungry-deletion of whitespace.
  970. * electric-pound (c-):                  Other electric commands.
  971. * electric-slash (c-):                  Other electric commands.
  972. * electric-star (c-):                   Other electric commands.
  973. * hanging-braces-alist (c-):            Indentation Commands.
  974. * indent-command (c-):                  Indentation Commands.
  975. * indent-defun (c-) <1>:                Interactive Customization.
  976. * indent-defun (c-):                    Indentation Commands.
  977. * indent-exp (c-):                      Indentation Commands.
  978. * indent-region:                        Indentation Commands.
  979. * lineup-streamop (c-):                 Custom Indentation Functions.
  980. * mark-function (c-):                   Indentation Commands.
  981. * newline-and-indent:                   Frequently Asked Questions.
  982. * set-offset (c-) <1>:                  File Styles.
  983. * set-offset (c-):                      Interactive Customization.
  984. * set-style (c-) <1>:                   Built-in Styles.
  985. * set-style (c-):                       Indentation Commands.
  986. * show-syntactic-information (c-):      Syntactic Analysis.
  987. * snug-do-while (c-):                   Custom Brace and Colon Hanging.
  988. * submit-bug-report (c-):               Mailing Lists and Submitting Bug Reports.
  989. * toggle-auto-hungry-state (c-):        Minor Modes.
  990. * toggle-auto-state (c-):               Minor Modes.
  991. * toggle-hungry-state (c-):             Minor Modes.
  992.  
  993. 
  994. File: ccmode,  Node: Key Index,  Next: Variable Index,  Prev: Command Index,  Up: Top
  995.  
  996. Key Index
  997. *********
  998.  
  999. * Menu:
  1000.  
  1001. * #:                                    Other electric commands.
  1002. * C-c C-a:                              Minor Modes.
  1003. * C-c C-b:                              Mailing Lists and Submitting Bug Reports.
  1004. * C-c C-d:                              Minor Modes.
  1005. * C-c C-o:                              Interactive Customization.
  1006. * C-c C-q <1>:                          Frequently Asked Questions.
  1007. * C-c C-q <1>:                          Custom Indentation Functions.
  1008. * C-c C-q <1>:                          Interactive Customization.
  1009. * C-c C-q:                              Indentation Commands.
  1010. * C-c C-s <1>:                          Syntactic Symbols.
  1011. * C-c C-s:                              Syntactic Analysis.
  1012. * C-c C-t:                              Minor Modes.
  1013. * C-u:                                  Auto-newline insertion.
  1014. * C-x h:                                Frequently Asked Questions.
  1015. * DEL:                                  Hungry-deletion of whitespace.
  1016. * ESC C-\:                              Frequently Asked Questions.
  1017. * ESC C-q:                              Frequently Asked Questions.
  1018. * ESC C-u:                              Frequently Asked Questions.
  1019. * ESC C-x:                              Frequently Asked Questions.
  1020. * LFD:                                  Frequently Asked Questions.
  1021. * M-C-\:                                Indentation Commands.
  1022. * M-C-h:                                Indentation Commands.
  1023. * M-C-q:                                Indentation Commands.
  1024. * RET:                                  Frequently Asked Questions.
  1025. * TAB <1>:                              Limitations and Known Bugs.
  1026. * TAB <1>:                              Indentation Commands.
  1027. * TAB:                                  Indentation Calculation.
  1028.  
  1029. 
  1030. File: ccmode,  Node: Variable Index,  Prev: Key Index,  Up: Top
  1031.  
  1032. Variable Index
  1033. **************
  1034.  
  1035.    Since all `cc-mode' variables are prepended with the string `c-',
  1036. each appears under its `c-<thing>' name and its `<thing> (c-)' name.
  1037.  
  1038. * Menu:
  1039.  
  1040. * basic-offset (c-):                    Advanced Customizations.
  1041. * c++-mode-hook:                        Permanent Customization.
  1042. * c-basic-offset:                       Advanced Customizations.
  1043. * c-cleanup-list:                       Clean-ups.
  1044. * c-delete-function:                    Hungry-deletion of whitespace.
  1045. * c-echo-syntactic-information-p:       Indentation Calculation.
  1046. * c-electric-pound-behavior:            Other electric commands.
  1047. * c-file-offsets:                       File Styles.
  1048. * c-file-style:                         File Styles.
  1049. * c-hanging-braces-alist <1>:           Custom Brace and Colon Hanging.
  1050. * c-hanging-braces-alist:               Hanging Braces.
  1051. * c-hanging-colon-alist:                Custom Brace and Colon Hanging.
  1052. * c-hanging-colons-alist:               Hanging Colons.
  1053. * c-hanging-semi&comma-criteria:        Customizing Semi-colons and Commas.
  1054. * c-mode-common-hook:                   Permanent Customization.
  1055. * c-mode-hook:                          Permanent Customization.
  1056. * c-offsets-alist <1>:                  Syntactic Symbols.
  1057. * c-offsets-alist <1>:                  Custom Indentation Functions.
  1058. * c-offsets-alist <1>:                  File Styles.
  1059. * c-offsets-alist <1>:                  Other electric commands.
  1060. * c-offsets-alist <1>:                  Hanging Braces.
  1061. * c-offsets-alist <1>:                  Indentation Calculation.
  1062. * c-offsets-alist:                      Syntactic Analysis.
  1063. * c-progress-interval:                  Indentation Commands.
  1064. * c-recognize-knr-p:                    Performance Issues.
  1065. * c-special-indent-hook:                Other Special Indentations.
  1066. * c-style-alist <1>:                    Advanced Customizations.
  1067. * c-style-alist:                        Adding Styles.
  1068. * c-syntactic-context:                  Custom Brace and Colon Hanging.
  1069. * c-tab-always-indent:                  Indentation Commands.
  1070. * cc-lobotomy-pith-list:                Performance Issues.
  1071. * cleanup-list (c-):                    Clean-ups.
  1072. * delete-function (c-):                 Hungry-deletion of whitespace.
  1073. * echo-syntactic-information-p (c-):    Indentation Calculation.
  1074. * electric-pound-behavior (c-):         Other electric commands.
  1075. * file-offsets (c-):                    File Styles.
  1076. * file-style (c-):                      File Styles.
  1077. * hanging-braces-alist (c-) <1>:        Custom Brace and Colon Hanging.
  1078. * hanging-braces-alist (c-):            Hanging Braces.
  1079. * hanging-colon-alist (c-):             Custom Brace and Colon Hanging.
  1080. * hanging-colons-alist (c-):            Hanging Colons.
  1081. * hanging-semi&comma-criteria (c-):     Customizing Semi-colons and Commas.
  1082. * java-mode-hook:                       Permanent Customization.
  1083. * objc-mode-hook:                       Permanent Customization.
  1084. * offsets-alist (c-) <1>:               Syntactic Symbols.
  1085. * offsets-alist (c-) <1>:               Custom Indentation Functions.
  1086. * offsets-alist (c-) <1>:               File Styles.
  1087. * offsets-alist (c-) <1>:               Other electric commands.
  1088. * offsets-alist (c-) <1>:               Hanging Braces.
  1089. * offsets-alist (c-) <1>:               Indentation Calculation.
  1090. * offsets-alist (c-):                   Syntactic Analysis.
  1091. * progress-interval (c-):               Indentation Commands.
  1092. * recognize-knr-p (c-):                 Performance Issues.
  1093. * special-indent-hook (c-):             Other Special Indentations.
  1094. * style-alist (c-) <1>:                 Advanced Customizations.
  1095. * style-alist (c-):                     Adding Styles.
  1096. * syntactic-context (c-):               Custom Brace and Colon Hanging.
  1097. * tab-always-indent (c-):               Indentation Commands.
  1098.  
  1099.  
  1100.